package com.rd.teacher.jichao.day27;

public class Test39 {

    public static void main(String[] args) {
        Person1 p = new Person1();
        Person1 t = new Teacher();
        Person1 s = new Student();
        if(t instanceof Person1) {
            s = (Student)t;
        }
    }
}

class Person1{}
class Teacher extends Person1{ }
class Student extends Person1{ }
